package com.iefgames.cs.manager;

import java.util.HashMap;
import java.util.Map;
import java.util.Vector;

import com.iefgames.cs.shout.Shout;

public final class MessageManager {
	private static final Map<String, Vector<Shout>> messageMap = new HashMap<String, Vector<Shout>>();
	
	public static void add(String uuid, Shout shout) {
		Vector shouts = messageMap.get(uuid);
		if (shouts == null) {
			shouts = new Vector<Shout>();
			messageMap.put(uuid, shouts);
		}

		shouts.add(shout);
	}
	
	public static Vector get(String uuid) {
		return messageMap.get(uuid);
	}
	
	public static void remove(String uuid) {
		messageMap.remove(uuid);
	}
	
	public static boolean hasShout(String uuid) {
		return get(uuid) != null && !get(uuid).isEmpty() ? true : false;
	} 
}
